//
//  MyWalletCell.m
//  FbeeAPP
//
//  Created by dev-m on 2018/3/19.
//  Copyright © 2018年 mohao. All rights reserved.
//

#import "MyWalletCell.h"
#import "WalletObj.h"

@interface MyWalletCell()
{
    UILabel *title;
    UILabel *balance;
}

@end

@implementation MyWalletCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.backgroundColor = FBEE_COLOR_BACKGROUND;
        [self buildView];
    }
    
    return self;
}

-(void)buildView
{
    
    title = [UILabel makeLabel:^(TTLabelExtend *make) {
        make.addTextColor(FBEE_COLOR_TEXT).addFont([UIFont boldSystemFontOfSize:16.0f]);
        make.setFrame(CGRectMake(21, 0, 100, 70));
        [self addSubview:make];
    }];
    
    balance = [UILabel makeLabel:^(TTLabelExtend *make) {
        make.addTextColor(FBEE_COLOR_TEXT).addFont([UIFont boldSystemFontOfSize:16.0f]);
        make.setFrame(CGRectMake(0, 0, 200, 70));
        make.right = IPHONEWIDTH - 21;
        make.textAlignment = NSTextAlignmentRight;
        [self addSubview:make];
    }];
    
}

-(void)CellByObj:(WalletObj *)obj
{
    title.text = @"";
    balance.text = @"";
    
    title.text = obj.symbol;
    balance.text = obj.balance;
}

@end
